<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 引入 vue.js 文件 -->
    <script src="../js/vue.js"></script>
</head>

<body>
    <div id="app">
        <label for="male">
            <!-- 这里v-model 绑定的是value的值 点击单选框把value传递给sex -->
            <input type="radio" id="male" value="男" v-model="sex">男
        </label>

        <label for="female">
            <input type="radio" id="female" value="女" v-model="sex">女
        </label>

        <h2>你选择的性别是：{{sex}}</h2>
    </div>
    <script>
        new Vue({
            el: "#app",
            data: {
                message: "Hello Vue",
                sex: ''
            },
        });
    </script>
</body>

</html>